package com.devunion.salon.client.common;

import com.extjs.gxt.ui.client.widget.menu.Menu;
import com.extjs.gxt.ui.client.widget.menu.Item;
import com.devunion.salon.client.common.core.UserSession;

/**
 * @author spetrakovsky  25.02.2009
 */
public class SalonMenu extends Menu implements Secured {

    @Override
    public boolean add(Item item) {
        if (item instanceof Secured && !UserSession.getCurrentUserSession().isEnabled(this)) {
            return false;
        }
        return super.add(item);
    }

    public String getRequiredPrivilege() {
        return null;
    }
}
